<html lang="zh" xmlns:th="http://www.thymeleaf.org">
	<head>
		<title>成绩管理</title>
		<link rel="stylesheet" href="https://www.layuicdn.com/layui/css/layui.css">
		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
		<script src="https://www.layuicdn.com/layui/layui.js"></script>
	</head>
	<body>
		<div class="layui-col-xs10 layui-col-xs-offset1">
			<div class="layui-form" style="height: 450px;margin-top: 3%;">
			  <table class="layui-table">
			    <colgroup>
			      <col width="100">
			      <col width="300">
			      <col width="300">
			      <col>
			    </colgroup>
			    <thead>
			      <tr>
			        <th>编号</th>
			        <th>课程名称</th>
			        <th>试卷名称</th>
			        <th>试卷分数</th>
			      </tr> 
			    </thead>
			    <tbody>
			      <tr th:each="grade,status : ${grades}">
			        <td th:text="${status.count}"></td>
			        <td><a th:href="@{'info/' + ${grade.courseId}}" th:text="${grade.courseName}"></a></td>
			        <td th:text="${grade.paperName}"></td>
			        <td th:text="${grade.grade}"></td>
			      </tr>
			    </tbody>
			  </table>
			</div>
			<div class="layui-col-xs4 layui-col-xs-offset4">
				<button th:onclick="window.location.href = 'grade?page=[[${page-1}]]&limit=9'" type="button" class="layui-btn" th:disabled="${page > 1} ? '' : 'disabled'" th:classappend="${page > 1} ? '' : 'layui-btn-disabled'">上一页</button>
				<span th:text="${page}"></span>
				<button th:onclick="window.location.href = 'grade?page=[[${page+1}]]&limit=9'" type="button" class="layui-btn" th:disabled="${page < count} ? '' : 'disabled'" th:classappend="${page < count} ? '' : 'layui-btn-disabled'">下一页</button>
			</div>
		</div>
	</body>
</html>